package com.hpf.lease.common.result;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;

@Getter
@Schema(description = "响应的状态码和信息的枚举类")
public enum ResultCodeEnum {
        SUCCESS(200, "成功"),
        FAIL(201, "失败"),
        PARAM_ERROR(202, "参数不正确"),
        SERVICE_ERROR(203, "服务异常"),
        DATA_ERROR(204, "数据异常"),
        ILLEGAL_REQUEST(205, "非法请求"),
        REPEAT_SUBMIT(206, "重复提交"),
        DELETE_ERROR(207, "请先删除子集"),
        PAYMENT_TYPE_EXISTS_ERROR(208, "支付方式名称被占用"),
        FACILITY_TYPE_EXISTS_ERROR(208, "配套信息已存在"),
        ATTR_VALUE_EXISTS_ERROR(208, "房间属性的值已存在"),
        ATTR_KEY_EXISTS_ERROR(208, "房间属性的键已存在"),
        LABEL_NAME_EXISTS_ERROR(209, "标签名称已存在"),
        FEE_VALUE_EXISTS_ERROR(210, "房间房杂费的值已存在"),
        FEE_KEY_EXISTS_ERROR(211, "房间房杂费的键已存在"),
        LEASE_TERM_EXISTS_ERROR(213, "租期名已存在"),
        FILE_ERROR(214, "文件异常"),
        FILE_TYPE_ERROR(215, "文件类型异常"),
        APARTMENT_NAME_ERROR(216, "公寓名称重复异常"),
        ROOM_NAME_ERROR(217, "房间名称重复异常"),
        LEASE_AGREEMENT_ERROR(217, "租约异常"),
        SYSTEM_POST_EXISTS_ERROR(218, "岗位已存在"),

        ADMIN_ACCOUNT_EXIST_ERROR(301, "账号已存在"),
        ADMIN_CAPTCHA_CODE_ERROR(302, "验证码错误"),
        ADMIN_CAPTCHA_CODE_EXPIRED(303, "验证码已过期"),
        ADMIN_CAPTCHA_CODE_NOT_FOUND(304, "未输入验证码"),


        ADMIN_LOGIN_AUTH(305, "未登陆"),
        ADMIN_ACCOUNT_NOT_EXIST_ERROR(306, "账号不存在"),
        ADMIN_ACCOUNT_ERROR(307, "用户名或密码错误"),
        ADMIN_ACCOUNT_DISABLED_ERROR(308, "该用户已被禁用"),
        ADMIN_ACCESS_FORBIDDEN(309, "无访问权限"),

        APP_LOGIN_AUTH(501, "未登陆"),
        APP_LOGIN_PHONE_EMPTY(502, "手机号码为空"),
        APP_LOGIN_CODE_EMPTY(503, "验证码为空"),
        APP_SEND_SMS_TOO_OFTEN(504, "验证法发送过于频繁"),
        APP_LOGIN_CODE_EXPIRED(505, "验证码已过期"),
        APP_LOGIN_CODE_ERROR(506, "验证码错误"),
        APP_ACCOUNT_DISABLED_ERROR(507, "该用户已被禁用"),


        TOKEN_EXPIRED(601, "token过期"),
        TOKEN_INVALID(602, "token非法");

        private Integer code;
        private String message;
    ResultCodeEnum(Integer code,String message){
            this.code = code;
            this.message = message;
        }
}
